{extend name="v1/layout/base"}
{block name="content"}
<div class="layuimini-main">
  <script type="text/html" id="toolbar">
    <div class="layui-btn-container">
      <button class="layui-btn layui-btn-black  layui-btn-sm" lay-event="reseve"><i class="layui-icon">&#xe63d;</i></button>
      <div class="money_all"></div>
    </div>
  </script>
  <table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>
</div>
{/block}
{block name="myScript"}
<script>
  layui.use(['form', 'table', 'laydate'], function() {
    var $ = layui.jquery,
      form = layui.form,
      table = layui.table;
    table.render({
      elem: '#currentTableId',
      url: '/{:config("manage.manage_name")}/{:config("manage.version")}/Finance/bonusAllList',
      toolbar: '#toolbar',
      defaultToolbar: ['filter'],
      height: 'full-50',
      cols: [
        [{
            field: 'all_achievement_price',
            width: '25%',
            title: '上月平台总业绩'
          },
          {
            field: 'bonus_name',
            width: '25%',
            title: '分红阶梯'
          },
          {
            field: 'bonus_bili',
            width: '25%',
            title: '分红阶梯比例'
          },
          {
            field: 'all_money',
            width: '25%',
            title: '阶梯应分红金额'
          }
        ]
      ],
      done: function (res, curr, count) {
        $(".money_all").html(res.resultData.show_count);
      },
      limits: [100, 150, 200, 250, 500, 1000],
      limit: 100,
      id: 'table_ids',
      page: true,
      skin: 'line'
    });
    // 顶部操作工具
    table.on('toolbar(currentTableFilter)', function(obj) {
      switch (obj.event) {
        case 'reseve':
          table.reload('table_ids');
          break;
        case 'search':
          $("#xk-search-status").removeClass('xk-search-status');
          break;
      }
    })
  });
</script>
{/block}
